<!--
/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * Copyright 2014 The moOde audio player project / Tim Curtis
 *
 * 汉化：Androidnews
 *
*/
-->
<div id="container">
<div class="container">
	<h1 class="sys-config">系统</h1>

	<form class="form-horizontal" method="post" enctype="multipart/form-data">
		<div class="control-group">
			<legend>软件升级</legend>
			<label class="control-label">通知</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-updater-auto-check" for="toggle-updater-auto-check-2">开</label>$_select[updater_auto_check_on]
					<label class="toggle-radio toggle-updater-auto-check" for="toggle-updater-auto-check-1">关</label>$_select[updater_auto_check_off]
				</div>
				<button id="btn-set-updater-auto-check" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_updater_auto_check" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-update-updater-auto-check" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-update-updater-auto-check" class="config-help-info">
					Display a notification badge in Playback view if an available software update was detected during startup.
				</span>
			</div>

			<label class="control-label">可获得</label>
			<div class="controls">
				<button class="btn btn-medium btn-primary config-btn btn-submit" type="submit" name="checkfor_update" value="novalue">检查</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-checkfor-update" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				$_available_upd
				<span id="info-checkfor-update" class="config-help-info">
					Check for an available software update.
				</span>
		    </div>

			<label class="control-label">状态</label>
			<div class="controls">
				<a href="sys-status.php"><button class="btn btn-medium btn-primary config-btn">查看</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-view-status" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-view-status" class="config-help-info">
					View progress of the active in-place update or if the update has previously been applied view the update log.
				</span>
		    </div>
		</div>

		<div class="control-group">
			<legend>常规</legend>
			<label class="control-label" for="hostname">主机/播放器名称</label>
            <div class="controls">
                <input class="config-input-large" type="text" pattern="[A-Za-z0-9\-]{3,63}" id="hostname" name="hostname" value="$_select[hostname]" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_host_name" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<span class="config-help-info">
					Length 3-63 characters, alphanumeric and hyphen allowed. This is the name that will appear on the network.
				</span>
            </div>

            <label class="control-label" for="browsertitle">浏览器标题</label>
            <div class="controls">
                <input class="config-input-large" type="text" id="browsertitle" name="browsertitle" value="$_select[browsertitle]" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_browser_title" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            </div>

			<label class="control-label" for="timezone">时区</label>
			<div class="controls">
				<select id="timezone" class="config-select-large" name="timezone" onchange="autoClick('#btn-set-timezone');">
					$_timezone[timezone]
				</select>
				<button id="btn-set-timezone" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_time_zone" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
			</div>

            <label class="control-label" for="keyboard">键盘类型</label>
            <div class="controls">
                <select id="keyboard" class="config-select-large" name="keyboard" onchange="autoClick('#btn-set-keyboard');">
                    $_keyboard[keyboard]
                </select>
                <button id="btn-set-keyboard" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_keyboard" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
            </div>
		</div>

		<div class="control-group">
			<legend>启动选项</legend>
			<label class="control-label" for="worker-responsiveness">Worker响应</label>
			<div class="controls">
				<select id="worker-responsiveness" class="config-select-large" name="worker_responsiveness" onchange="autoClick('#btn-set-worker-responsiveness');">
					$_select[worker_responsiveness]
				</select>
				<button id="btn-set-worker-responsiveness" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_worker_responsiveness" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-worker-responsiveness" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-worker-responsiveness" class="config-help-info">
					<b>Default:</b> Suitable for all Raspberry Pi models.<br>
					<b>Boosted:</b> Best for multi-core Raspberry Pi's. This provides more responsiveness when using the Configuration screens or making other setting changes that require processing by the Worker daemon.
				</span>
			</div>

			<label class="control-label" for="cpugov">CPU调速器</label>
			<div class="controls">
				<select id="cpugov" class="config-select-large" name="cpugov" onchange="autoClick('#btn-set-cpugov');">
					$_select[cpugov]
				</select>
				<button id="btn-set-cpugov" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_cpugov" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-cpugov" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-cpugov" class="config-help-info">
					<b>On-demand:</b> Scale CPU frequency from min to max based on load.<br>
					<b>Performance:</b> Run the CPU at max frequency.
				</span>
			</div>

			<div class="$_pi_audio_driver_hide">
				<label class="control-label" for="pi-audio-driver">集成音频</label>
				<div class="controls">
					<select id="pi-audio-driver" class="config-select-large" name="pi_audio_driver" onchange="autoClick('#btn-set-pi-audio-driver');">
						$_select[pi_audio_driver]
					</select>
					<button id="btn-set-pi-audio-driver" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_pi_audio_driver" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-pi-audio-driver" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
					<span id="info-pi-audio-driver" class="config-help-info">
						<b>Kernel mode:</b> Default vc4-kms-v3d driver for advanced Pi HDMI capabilities.<br>
						<b>Firmware mode:</b> Legacy snd-bcm2835 driver to support Pi Headphone only configuration. No other audio, video or system features are supported.
					</span>
				</div>
			</div>

			<div class="$_pci_express_hide">
				<label class="control-label" for="pci-express">PCI扩展</label>
				<div class="controls">
					<select id="pci-express" class="config-select-large" name="pci_express" onchange="autoClick('#btn-set-pci-express');">
						$_select[pci_express]
					</select>
					<button id="btn-set-pci-express" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_pci_express" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-pci-express" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
					<span id="info-pci-express" class="config-help-info">
						<b>Gen 2.0:</b> Pi 5 PCIe feature is certified for up to 5 GT/sec.<br>
						<b>Gen 3.0:</b> Force Gen 3.0 speeds up to 10 GT/sec. Warning Pi 5 is not certified for Gen 3.0 speeds and connections may be unstable.
					</span>
				</div>
			</div>

			<div class="config-horiz-rule"></div>

			<div class="$_reduce_power_hide">
				<label class="control-label">低功率</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-reduce-power" for="toggle-reduce-power-2">开</label>$_select[reduce_power_on]
						<label class="toggle-radio toggle-reduce-power" for="toggle-reduce-power-1">关</label>$_select[reduce_power_off]
					</div>
					<button id="btn-set-reduce-power" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_reduce_power" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-reduce-power" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
					<span id="info-reduce-power" class="config-help-info">
						Turn this option on to reduce shutdown wattage to 0.01W.
						The default shutdown wattage is around 1 to 1.4W to support some HAT'S that require both the 3V and 5V rails.
                    </span>
				</div>
			</div>

			<div class="$_wifibt_hide">
				<label class="control-label">WiFi</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-p3wifi" for="toggle-p3wifi-2">开</label>$_select[p3wifi_on]
						<label class="toggle-radio toggle-p3wifi" for="toggle-p3wifi-1">关</label>$_select[p3wifi_off]
					</div>
					<button id="btn-set-p3wifi" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_p3wifi" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-p3wifi" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
					<span id="info-p3wifi" class="config-help-info">
						The integrated adapter appears on Pi-Zero W and Pi-3B and higher and models.
                    </span>
				</div>

				<label class="control-label">蓝牙</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-p3bt" for="toggle-p3bt-2">开</label>$_select[p3bt_on]
						<label class="toggle-radio toggle-p3bt" for="toggle-p3bt-1">关</label>$_select[p3bt_off]
					</div>
					<button id="btn-set-p3bt" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_p3bt" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-p3bt" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
					<span id="info-p3bt" class="config-help-info">
						The integrated adapter appears on Pi-Zero W and Pi-3B and higher and models.
                    </span>
				</div>
			</div>

			<label class="control-label">LED0 (Activity)</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-actled" for="toggle-actled-2">开</label>$_select[actled_on]
					<label class="toggle-radio toggle-actled" for="toggle-actled-1">关</label>$_select[actled_off]
				</div>
				<button id="btn-set-actled" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_actled" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-actled" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-actled" class="config-help-info">
					Turn the activity LED flashing for SDCard (mmc0) on/off.
                </span>
			</div>

			<div class="$_pwrled_hide">
				<label class="control-label">LED1 (Power)</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-pwrled" for="toggle-pwrled-2">开</label>$_select[pwrled_on]
						<label class="toggle-radio toggle-pwrled" for="toggle-pwrled-1">关</label>$_select[pwrled_off]
					</div>
					<button id="btn-set-pwrled" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_pwrled" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-pwrled" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
					<span id="info-pwrled" class="config-help-info">
						Turn the Power LED on/off.
                    </span>
				</div>
			</div>

			<div class="config-horiz-rule"></div>

			<label class="control-label" for="ipaddr-timeout">Address timeout</label>
			<div class="controls">
				<select id="ipaddr-timeout" class="config-select-large" name="ipaddr_timeout" onchange="autoClick('#btn-set-ipaddr-timeout');">
					$_select[ipaddr_timeout]
				</select>
				<button id="btn-set-ipaddr-timeout" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_ipaddr_timeout" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<span class="config-help-static">
					在启动过程中,等待指定的时间段,以便将IP地址分配给适配器.
				    如果没有适配器收到IP地址,WiFi热点将启动,以确保moOde可以访问.
				</span>
			</div>

			<label class="control-label">等待以太网</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-eth0chk" for="toggle-eth0chk-2">开</label>$_select[eth0chk_on]
					<label class="toggle-radio toggle-eth0chk" for="toggle-eth0chk-1">关</label>$_select[eth0chk_off]
				</div>
				<button id="btn-set-eth0chk" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_eth0chk" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-eth0chk" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-eth0chk" class="config-help-info">
					Wait for up to "Address timeout" seconds for an address to be assigned to the Ethernet adapter.
					If set to NO the address check will be skipped and startup time will be reduced.
				</span>
			</div>
		</div>

		<div class="control-group">
			<legend>文件共享</legend>
			<p class="sub-legend">
				这些服务使驻留在该主机上的文件可以通过网络被其他主机访问.
			</p>

			<label class="control-label">SMB (Samba)</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-fs-smb" for="toggle-fs-smb-2">开</label>$_select[fs_smb_on]
					<label class="toggle-radio toggle-fs-smb" for="toggle-fs-smb-1">关</label>$_select[fs_smb_off]
				</div>
				<button id="btn-set-fs-smb" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_smb" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<span class="config-help-static">
					服务器消息块(SMB)允许通过网络与Windows、Mac和Linux客户端共享文件.<br>
					<b>Shares: </b> NAS, SDCard, Playlists and USB shares are automatically created.<br>
					<b>Access: </b> Specify "anonymous" access or userid = guest and no password when mounting shares.<br>
                </span>
			</div>

			<div class="config-horiz-rule"></div>

			<label class="control-label">NFS</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-fs-nfs" for="toggle-fs-nfs-2">开</label>$_select[fs_nfs_on]
					<label class="toggle-radio toggle-fs-nfs" for="toggle-fs-nfs-1">关</label>$_select[fs_nfs_off]
				</div>
				<button id="btn-set-fs-nfs" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_nfs" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<span class="config-help-static">
					网络文件共享(NFS)允许通过网络与Linux客户端共享文件.<br>
					<b>导出：</b> 自动维护挂载到 /media 的 USB 存储设备在 /etc/exports 中。其他存储位置必须手动添加。<br>
					<b>格式：</b> 仅推荐使用 Ext4 和 Fat32 (VFAT) 文件系统格式。

				</span>
			</div>

			<label class="control-label" for="fs-nfs-access">访问</label>
			<div class="controls">
				<input id="fs-nfs-access" class="input-large config-input-large" type="text" name="fs_nfs_access" value="$_select[fs_nfs_access]" placeholder="IP address or subnet">
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_nfs_access" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<span class="config-help-static">
					指定允许访问NFS导出的客户端IP或子网地址.<br>
					Use Classless Inter-Domain Routing (CIDR) notation for example /24 for 255.255.255.0 subnet, /32 for IP address.<br>
					This subnet is: <b>$_this_subnet</b>
				</span>
			</div>

			<label class="control-label" for="fs-nfs-options">设置</label>
			<div class="controls">
				<input id="fs-nfs-options" class="input-large config-input-large" type="text" name="fs_nfs_options" value="$_select[fs_nfs_options]" required>
				<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_fs_nfs_options" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<span class="config-help-static">
					这些选项确定授予已连接客户端的权限.<br>
					Default options: rw,sync,no_subtree_check,no_root_squash
				</span>
			</div>

			<div class="config-horiz-rule"></div>

			<div class="$_feat_minidlna">
				<label class="control-label">DLNA</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-dlnasvc" for="toggle-dlnasvc-2">开</label>$_select[dlnasvc_on]
						<label class="toggle-radio toggle-dlnasvc" for="toggle-dlnasvc-1">关</label>$_select[dlnasvc_off]
					</div>
					<button id="btn-set-dlnasvc" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_dlna_settings" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<span class="config-help-static">
						DLNA媒体服务器索引为MPD定义的音乐源,并使其可用于UPnP控制点.
	                </span>
				</div>

				<label class="control-label" for="dlnaname">名称</label>
				<div class="controls">
					<input class="config-input-large" type="text" id="dlnaname" name="dlnaname" value="$_select[dlnaname]" required>
					<button class="btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_dlna_settings" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				</div>

				<div class="controls">
					<a data-toggle="modal" href="#rebuild-dlnadb" $_dlna_link_disable><button class="btn btn-medium btn-primary config-btn" $_dlna_btn_disable>Rebuild</button>
					<span class="config-btn-after">DLNA数据库</span>
				</div>

				<div class="controls">
					<a href="http://$_select[hostip]:8200" class="btn btn-medium btn-primary config-btn target-blank-link" target="_blank" $_dlna_link_disable $_dlna_btn_disable>查看</a>
					<span class="config-btn-after">数据库状态</span>
				</div>
			</div>
		</div>

		<div class="control-group">
			<legend>Security</legend>
			<label class="control-label">Web SSH</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-shellinabox" for="toggle-shellinabox-2">开</label>$_select[shellinabox_on]
					<label class="toggle-radio toggle-shellinabox" for="toggle-shellinabox-1">关</label>$_select[shellinabox_off]
				</div>
				<button id="btn-set-shellinabox" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_shellinabox" value="novalue" $_webssh_set_disable><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-shellinabox" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-shellinabox" class="config-help-info">
					Web based Secure Shell terminal using Shellinabox by Markus Gutschk and Luka Krajger.
                </span>
			</div>
			<div class="controls">
				<a href="http://$_select[hostip]:4200" class="btn btn-medium btn-primary config-btn target-blank-link" target="_blank" $_webssh_link_disable $_webssh_open_disable>打开</a>
				<span class="config-btn-after">SSH终端</span>
			</div>

			<div class="config-horiz-rule"></div>

			<!-- HTTPS mode -->
			<div class="$_feat_https">
				<label class="control-label">HTTPS模式</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-nginx-https-only" for="toggle-nginx-https-only-2">开</label>$_select[nginx_https_only_on]
						<label class="toggle-radio toggle-nginx-https-only" for="toggle-nginx-https-only-1">关</label>$_select[nginx_https_only_off]
					</div>
					<button id="btn-set-nginx-https-only" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_nginx_https_only" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<a aria-label="Help" class="config-info-toggle" data-cmd="info-nginx-https-only" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
					<span id="info-nginx-https-only" class="config-help-info">
						打开此选项,将NGINX web服务器配置为仅接受HTTPS连接.
					</span>
				<span class="config-help-static">
   				 <b>实验性功能：</b> 启用浏览器和 moOde 之间的安全通信。<br>
  				  查看 <a href="./setup_https.txt" class="target-blank-link" target="_blank">配置指南</a>
 				   以获取有关 HTTPS 模式如何工作的详细信息。
				</span>

				</div>

				<label class="control-label" for="nginx-cert-type">证书类型</label>
				<div class="controls">
					<select id="nginx-cert-type" class="config-select-large" name="nginx_cert_type" onchange="autoClick('#btn-set-nginx-cert-type');">
						$_select[nginx_cert_type]
					</select>
					<button id="btn-set-nginx-cert-type" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_nginx_cert_type" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
					<span class="config-help-static">
						<b>Automatic:</b> 当HTTPS模式打开时,自动生成自签名证书并将其安装到NGINX web服务器中.<br>
					    <b>Manual:</b> 对于这种类型的证书,单击上传,然后单击安装按钮.
					</span>
				</div>

				<!--SAVE:label class="control-label">HSTS policy</label>
				<div class="controls">
					<div class="toggle">
						<label class="toggle-radio toggle-nginx-hsts-policy" for="toggle-nginx-hsts-policy-2">开</label>$_select[nginx_hsts_policy_on]
						<label class="toggle-radio toggle-nginx-hsts-policy" for="toggle-nginx-hsts-policy-1">关</label>$_select[nginx_hsts_policy_off]
					</div>
					<button id="btn-set-nginx-hsts-policy" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_nginx_hsts_policy" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				
					<span class="config-help-static">
						<b>注意:</b> Turning this on sets a Browser policy that forces HTTPS even after turning HTTPS mode OFF.
					</span>
				</div-->

				<div class="$_automatic_cert">
					<label class="control-label">证书</label>
					<div class="controls">
						<button id="btn-download-self-signed-cert" class="btn btn-medium btn-primary config-btn" type="submit" name="download_self_signed_cert" value="1">下载</button>
						<div class="config-help-static">
							下载自签名证书以手动导入到客户端的证书存储中.导入证书的具体方法因客户端操作系统而异.
						</div>
					</div>
				</div>

				<div class="$_manual_cert">
					<label class="control-label">证书</label>
					<div class="controls">
						<label for="nginx-cert-files" id="choose-nginx-cert-files" class="btn btn-primary btn-medium config-btn">上传</label>
						<input type="file" id="nginx-cert-files" accept=".crt, .key" multiple name="nginx_cert_files[]" style="display:none" onchange="$('#btn-upload-nginx-cert-files').click();">
						<button id="btn-upload-nginx-cert-files" class="btn btn-medium btn-primary btn-submit" type="submit" name="upload_nginx_cert_files" value="1" style="display:none"></button>
						<a aria-label="Help" class="config-info-toggle" data-cmd="info-nginx-cert-files" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
						<span id="info-nginx-cert-files" class="config-help-info">
							Choose and upload the certificate .crt and .key files for subsequent installation into NGINX web server.
						</span>
						<div class="config-help-static">
							$_uploaded_cert_files
						</div>
					</div>

					<div class="controls">
						<button class="btn btn-medium btn-primary btn-submit config-btn" type="submit" name="nginx_install_cert" value="1">安装证书</button>
						<span class="config-help-static">
							Install the previously uploaded .crt and .key files into NGINX web server.
						</span>
					</div>
				</div>

				<div class="config-horiz-rule"></div>

				<!-- XSS detection -->
			<label class="control-label">XSS 检测</label>
<div class="controls">
    <div class="toggle">
        <label class="toggle-radio toggle-xss-detect" for="toggle-xss-detect-2">开启</label>$_select[xss_detect_on]
        <label class="toggle-radio toggle-xss-detect" for="toggle-xss-detect-1">关闭</label>$_select[xss_detect_off]
    </div>
    <button id="btn-set-xss-detect" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_xss_detect" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
    <a aria-label="帮助" class="config-info-toggle" data-cmd="info-xss-detect" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
    <span class="config-help-static">
        检测并报告音乐文件元数据中发现的任何嵌入式跨站脚本（XSS）命令或字符，并记录在 moOde 日志中。
    </span>
    <span id="info-xss-detect" class="config-help-info">
        每次生成库标签缓存时都会执行检测，因此仅在必要时使用该功能。<br>
        - 清除库标签缓存。<br>
        - 切换到播放或库视图以重新生成缓存。<br>
        - 查看 moOde 启动日志以获取可疑文件/标签列表。<br>
        - 检查标签值以确定其是否为恶意的 XSS 代码，或只是使用 < > 或 = 的文本。
    </span>
</div>

		<div class="control-group">
			<legend>备份/恢复</legend>
			<label class="control-label">备份系统</label>
			<div class="controls">
				<a href="bkp-config.php?action=backup"><button class="btn btn-medium btn-primary config-btn">备份</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-backup-system" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-backup-system" class="config-help-info">
					Backup configuration settings and preferences, radio stations, playlists and CamillaDSP configs.
                </span>
			</div>

			<label class="control-label">恢复系统</label>
			<div class="controls">
				<a href="bkp-config.php?action=restore"><button class="btn btn-medium btn-primary config-btn">恢复</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-restore-system" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-restore-system" class="config-help-info">
					Restore configuration settings and preferences, radio stations, playlists and CamillaDSP configs.
                </span>
			</div>
		</div>

		<div class="control-group">
			<legend>日志</legend>
			<label class="control-label">启动日志</label>
			<div class="controls">
				<button class="btn btn-medium btn-primary config-btn" type="submit" name="download_logs" value="1">下载</button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-download-logs" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-download-logs" class="config-help-info">
					Download the moOde startup log: /var/log/moode.log
                </span>
			</div>

			<label class="control-label">系统日志</label>
			<div class="controls">
				<a href="#clear-syslogs" data-toggle="modal"><button class="btn btn-medium btn-primary config-btn">清除</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-clear-syslogs" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-clear-syslogs" class="config-help-info">
					Clear various system log files. Note the logs are cleared periodically by the Maintenance task.
                </span>
			</div>

			<label class="control-label">播放历史日志</label>
			<div class="controls">
				<a href="#clear-playbackhist" data-toggle="modal"><button class="btn btn-medium btn-primary config-btn">清除</button></a>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-clear-playhistory" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-clear-playhistory" class="config-help-info">
					Clear the playback history log. Perform this task periodically since the log grows over time.
                </span>
			</div>

			<div class="config-horiz-rule"></div>

			<label class="control-label">调试日志</label>
			<div class="controls">
				<div class="toggle">
					<label class="toggle-radio toggle-debuglog" for="toggle-debuglog-2">开</label>$_select[debuglog_on]
					<label class="toggle-radio toggle-debuglog" for="toggle-debuglog-1">关</label>$_select[debuglog_off]
				</div>
				<button id="btn-set-debuglog" class="hide btn btn-primary btn-small config-btn-set btn-submit" type="submit" name="update_debuglog" value="novalue"><i class="fa fa-solid fa-sharp fa-arrow-turn-down-left"></i></button>
				<a aria-label="Help" class="config-info-toggle" data-cmd="info-debuglog" href="#notarget"><i class="fa-regular fa-sharp fa-info-circle"></i></a>
				<span id="info-debuglog" class="config-help-info">
					<b>Log files:</b><br>
					<table class="cdsp-help-table">
						<tr><td>启动和任务</td><td>/var/log/moode.log</td></tr>
						<tr><td>挂载监控</td><td>/var/log/moode_mountmon.log</td></tr>
						<tr><td>系统更新器</td><td>/var/log/moode_autocfg.log</td></tr>
						<tr><td>自动配置</td><td>/var/log/moode_update.log</td></tr>
						<tr><td>Spotify</td><td>/var/log/moode_librespot.log</td></tr>
						<tr><td>AirPlay</td><td>/var/log/moode_shairport-sync.log</td></tr>
						<tr><td>Squeezelite 事件</td><td>/var/log/moode_slpower.log</td></tr>
						<tr><td>Spotify 事件</td><td>/var/log/moode_spotevent.log</td></tr>
						<tr><td>AirPlay 事件</td><td>/var/log/moode_spsevent.log</td></tr>
						<tr><td>播放历史</td><td>/var/log/moode_playhistory.log</td></tr>
						<tr><td>WebUI Javascript</td><td>浏览器控制台</td></tr>

					</table>
                </span>
				<span class="config-help-static">
					<b>注意:</b> 仅在解决问题时打开此选项.它会创建大型日志文件并降低性能.
				</span>
			</div>
		</div>
	</form>
</div>
</div>

<form class="form-horizontal" method="post">
	<div id="view-pkgcontent" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="view-pkgcontent-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3 id="view-pkgcontent-label">包内容</h3>
		</div>
		<div class="modal-body">
			$_pkg_description
			$_pkg_relnotes
		</div>
		<div class="modal-footer">
			<button class="btn singleton" data-dismiss="modal" aria-hidden="true">关闭</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="restart-localui" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="restart-localui-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>重启本地图形化界面?</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="update_restart_localui" value="novalue">确认</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="clear-playbackhist" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="clear-playbackhist-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>清理播放历史?</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="update_clear_playhistory" value="novalue">确认</button>
		</div>
	</div>
</form>

<form class="form-horizontal" method="post">
	<div id="clear-syslogs" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="clear-syslogs-label" aria-hidden="true">
		<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h3>清理系统日志?</h3>
		</div>
		<div class="modal-body"></div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
			<button class="btn btn-primary btn-submit" type="submit" name="update_clear_syslogs" value="novalue">确认</button>
		</div>
	</div>
</form>
